<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import Slider from "@/components/Slider.vue"

let items = ref()
let video = ref()
onMounted(() => {
    const arr = Array.from({length:7},(_,i)=>{
        return  {video_src: "./src/assets/videos/"+(i+1)+".mp4" ,bg_img:"",bg_color:"#000",title:"视频1",user:{name:'作者1',avatar:''}}
    })
    arr.sort(()=>{
        return 0.5 - Math.random()
    })
    items.value = arr

});

</script>
<template>
    <div ref="video" style="display: flex; height: 100%; flex-direction: row; padding-left: 8px;overflow-y: auto;">
        <Slider :items="items" :index="0" style="height:100%;width: 100%;padding-bottom:0.725rem;" />
    </div>
</template>
<style scoped>

</style>
